PaginationResult

data class PaginationResult<T>(    val page: Int,     val pagesNumber: Int,     val results: List<T>,     val size: Int) : Pagination

Constructors

Link copied to clipboard
fun <T> PaginationResult(    page: Int,     pagesNumber: Int,     results: List<T>,     size: Int)

Functions

Link copied to clipboard
open operator fun contains(value: Int): Boolean
Link copied to clipboard
open fun isEmpty(): Boolean

Properties

Link copied to clipboard
open override val endInclusive: Int
Link copied to clipboard
open override val page: Int

Started with 0. Number of page inside of pagination. Offset can be calculated as page * size

Link copied to clipboard
val pagesNumber: Int
Link copied to clipboard
val results: List<T>
Link copied to clipboard
open override val size: Int

Can be 0, but can't be < 0 Size of current page. Offset can be calculated as page * size

Link copied to clipboard
open override val start: Int

Extensions

changeResults
Link copied to clipboard
fun <I, O> PaginationResult<I>.changeResults(data: List<O>): PaginationResult<O>
fun <I, O> PaginationResult<I>.changeResults(data: List<O>): PaginationResult<O>
fun <I, O> PaginationResult<I>.changeResults(data: List<O>): PaginationResult<O>
changeResultsUnchecked
Link copied to clipboard
fun <I, O> PaginationResult<I>.changeResultsUnchecked(data: List<O>): PaginationResult<O>
fun <I, O> PaginationResult<I>.changeResultsUnchecked(data: List<O>): PaginationResult<O>
fun <I, O> PaginationResult<I>.changeResultsUnchecked(data: List<O>): PaginationResult<O>
currentPageIfNotEmpty
Link copied to clipboard
inline fun <T> PaginationResult<T>.currentPageIfNotEmpty(): PaginationResult<T>?
inline fun <T> PaginationResult<T>.currentPageIfNotEmpty(): PaginationResult<T>?
inline fun <T> PaginationResult<T>.currentPageIfNotEmpty(): PaginationResult<T>?
nextPageIfNotEmpty
Link copied to clipboard
inline fun PaginationResult<*>.nextPageIfNotEmpty(): SimplePagination?
inline fun PaginationResult<*>.nextPageIfNotEmpty(): SimplePagination?
inline fun PaginationResult<*>.nextPageIfNotEmpty(): SimplePagination?
thisPageIfNotEmpty
Link copied to clipboard
inline fun <T> PaginationResult<T>.thisPageIfNotEmpty(): PaginationResult<T>?
inline fun <T> PaginationResult<T>.thisPageIfNotEmpty(): PaginationResult<T>?
inline fun <T> PaginationResult<T>.thisPageIfNotEmpty(): PaginationResult<T>?